<!--{template admin/header}-->

<script type="text/javascript" src="templates/default/js/movie.js"></script>

<!-- {if $show_catch} -->
<form method="post" action="admin.php?m=movie&a=do_catch">
	<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
		<tr class="header">
			<td colspan="2">从豆瓣抓取影片内容</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">页面URL:&nbsp;<span style="color:red;">*</span></td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input size="60" type="text" name="url" value="{$catch_url}" maxlength="90">&nbsp;&nbsp;&nbsp;&nbsp;
		  		<input type="submit" class="button" name="addsubmit" value="提 交">
		  	</td>
		</tr>
	</table>
</form>
<!-- {/if} -->

<!-- {if $request['id']} -->
<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
	<tr class="header">
		<td colspan="1">上传图片</td>
	</tr>
	<tr>
		<td width="90%" align="right" bgcolor="#FFFFFF">
			 <div class="menu_pi insertImgDiv" id="insertImgDiv">
		    	<iframe id="imageUploadifyIframe" name="imageUploadifyIframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank" style="display:none;"></iframe>
			    <div id="normalUploadDiv">
					<form id="normalUploadForm" name="normalUploadForm" method="post" action="ajax.php?m=image&a=do_upload" enctype="multipart/form-data" target="imageUploadifyIframe">
			    		<input type="input" name="mid" id="mid" value="{$request[id]}" style="display:none;" />
			    		<input type="input" id="cid" value="2" style="display:none;" />
			    		可上传JPG、JPEG、GIF、PNG图片格式（小于<span style="color:red;">2M</span>）；<br />
			    		上传&nbsp;&nbsp;
			    		<input type="radio" name="cid" value="1" onclick="check_radio(this, 'cid');">海报&nbsp;&nbsp;
			    		<input type="radio" name="cid" value="2" onclick="check_radio(this, 'cid');" checked="checked">剧照&nbsp;&nbsp;
			    		<input type="file" id="normalUploadFile" name="image" />
			    		<input name="normalUploadForm" type="submit" value="上传" class="button" />
			    	</form>
			    </div>
			</div>
	  	</td>
	</tr>
	<tr>
		<td>
			<div>
				或通过FTP上传图片至 “<span style="color:red;">wwwroot/data/ftp_images/</span>”，再点击添加按钮导入。
				<input type="button" class="button" onclick="upload_movie_image('{$request['id']}')" value="添 加">
				<div id="upload_wating" style="display:none"><img src="templates/default/images/loading.gif" />正在上传，请不要关闭或刷新本页面</div>
			</div>
		</td>
	</tr>
</table>
<!-- {/if} -->

<form method="post" action="admin.php?m=movie&a={$action}">
	<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
		<tr class="header">
			<td colspan="2">{$action_name}</td>
		</tr>
		<!-- {if $request['id']} -->
		<tr>
			<td width="15%" bgcolor="#F8F8F8">影片海报:</td>
			<td width="85%" align="right" bgcolor="#FFFFFF">
				<div id="movie_face">
		  			<!--{loop $request['movie_face'] $id $image}-->
		  			<a href="{$image[org]}">
		  				<img width="50" height="72" src="{$image[small]}">
		  			</a>
		  			<a href="ajax.php?m=image&a=do_delete&ids={$id}&url={echo urlencode('admin.php?m=movie&a=modify&id='.$request['id']);}">删除</a>
		  			<!--{/loop}-->
		  		</div>
		  	</td>
		</tr>
		<!-- {/if} -->
		<tr>
			<td bgcolor="#F8F8F8">影片名称:&nbsp;<span style="color:red;">*</span></td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input size="60" type="text" name="name" value="{$request[name]}" maxlength="90">
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">导演:&nbsp;<span style="color:red;">*</span></td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input size="60" type="text" name="director" value="{$request[director]}" maxlength="90">
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">主演:(多个姓名用逗号隔开)&nbsp;<span style="color:red;">*</span></td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input size="60" type="text" name="actor" value="{$request[actor]}" maxlength="250">
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">上映日期:&nbsp;<span style="color:red;">*</span><br />
			例如（2012-01-01 00:00:00）
			</td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input size="60" type="text" name="release_date" value="{$request[release_date]}" maxlength="45">
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">星级:</td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input size="1" type="text" name="star" value="{$request[star]}" maxlength="1">
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">影片分类:</td>
			<td align="right" bgcolor="#FFFFFF">
		  		{$category_select}
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">是否标记为热映:</td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input type="checkbox" id="is_hot" name="is_hot" onclick="click_check(this, 'is_expect');" {$request[is_hot]}>
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">是否标记为期待:</td>
			<td align="right" bgcolor="#FFFFFF">
		  		<input type="checkbox" id="is_expect" name="is_expect" onclick="click_check(this, 'is_hot');" {$request[is_expect]}>
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">影片简介:&nbsp;<span style="color:red;">*</span></td>
			<td align="right" bgcolor="#FFFFFF">
		  		<textarea cols="100" rows="5" name="desc">{$request[desc]}</textarea>
		  	</td>
		</tr>
		<!-- {if $request['id']} -->
		<tr>
			<td width="15%" bgcolor="#F8F8F8">影片花絮:</td>
			<td width="85%" align="right" bgcolor="#FFFFFF">
				<div id="movie_titbit">
					<input size="60" type="text" name="titbit_url" id="titbit_url" value="" maxlength="250">&nbsp;&nbsp;
					<input type="button" class="button" name="addsubmit" onclick="add_titbit('{$request['id']}')" value="添 加"><br />
		  			<!--{loop $request['titbit'] $id $item}-->
		  			{echo $id + 1}. <span style="color:blue;">{$item[titbit_url]}</span>
		  			<a href="ajax.php?m=movie_titbit&a=do_delete&mid={$request['id']}&ids={$item[id]}">删除</a><br />
		  			<!--{/loop}-->
		  		</div>
		  	</td>
		</tr>
		<tr>
			<td width="15%" bgcolor="#F8F8F8">影片经典语录:</td>
			<td width="85%" align="right" bgcolor="#FFFFFF">
				<div id="movie_refer">
					<textarea cols="60" rows="5" name="refer" id="refer"></textarea>
					<input type="button" class="button" name="addsubmit" onclick="add_refer('{$request['id']}')" value="添 加"><br />
		  			<!--{loop $request['refer'] $id $item}-->
		  			{echo $id + 1}. <span style="color:blue;">{$item[refer]}</span>
		  			<a href="ajax.php?m=movie_refer&a=do_delete&mid={$request['id']}&ids={$item[id]}">删除</a><br />
		  			<!--{/loop}-->
		  		</div>
		  	</td>
		</tr>
		<tr>
			<td bgcolor="#F8F8F8">影片剧照:<br />
				<a style="color:red;" href="ajax.php?m=image&a=do_delete&ids={$image_ids}&url={echo urlencode('admin.php?m=movie&a=modify&id='.$request['id']);}">全部删除</a>
			</td>
			<td align="right" bgcolor="#FFFFFF">
		  		<div id="movie_image">
		  			<!--{loop $request['image_list'] $id $image}-->
		  			<a href="{$image[org]}">
		  				<img width="50" height="50" src="{$image[small]}">
		  			</a>
		  			<a href="ajax.php?m=image&a=do_delete&ids={$id}&url={echo urlencode('admin.php?m=movie&a=modify&id='.$request['id']);}">删除</a>
		  			<!--{/loop}-->
		  		</div>
		  	</td>
		</tr>
		<!-- {/if} -->
	</table>
	<br />
	<center><input type="submit" class="button" name="addsubmit" value="提 交"></center>
</form>
